#include "windows.h"
#include "LearnBase.h"
#include "StartUp.h"
#include "UnicodeClass.h"
#include "WindowMessage.h"
#include "TextOutput.h"
#include "GDIDraw.h"
#include "KeyboardClass.h"
#include "MouseClass.h"
#include "TimerClass.h"
#include "SubWindowWidget.h"
#include "MenuResource.h"
#include "DialogClass.h"
#include "ClipboardClass.h"

Learn::LearnBase* SelectLearnTag(Learn::LearnTag tag)
{
    Learn::LearnBase* result = nullptr;
    switch (tag)
    {
    case Learn::StartUpTag:
        result = new Learn::StartUp();
        break;
    case Learn::UnicodeTag:
        result = new Learn::UnicodeClass();
        break;
    case Learn::WindowMessageTag:
        result = new Learn::WindowMessage();
        break;
    case Learn::TextOutputTag:
        result = new Learn::TextOutput();
        break;
    case Learn::GDIDrawTag:
        result = new Learn::GDIDraw();
        break;
    case Learn::KeyboardTag:
        result = new Learn::KeyboardClass();
        break;
    case Learn::MouseTag:
        result = new Learn::MouseClass();
        break;
    case Learn::TimerTag:
        result = new Learn::TimerClass();
        break;
    case Learn::SubWindowWidgetTag:
        result = new Learn::SubWindowWidget();
        break;
    case Learn::MenuResourceTag:
        result = new Learn::MenuResource();
        break;
    case Learn::DialogTag:
        result = new Learn::DialogClass();
        break;
    case Learn::ClipboardTag:
        result = new Learn::ClipboardClass();
        break;
    default:
        break;
    }
    return result;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
    Learn::LearnBase* instance = SelectLearnTag(Learn::LearnTag::TextOutputTag);
    int result = instance->LearnEntry(hInstance, hPrevInstance, lpCmdLine, nShowCmd);

    SAFE_DELETE(instance);
    return result;
}
